use std::time::Instant;

fn main() {
    let start = Instant::now();

    let mut x:i32 = 1;

    let mut i = 1;

    loop {
        x += x;

        i += 1;

        if i > 30 {
            break;
        }
    }

    println!("cost : {:?} ns", start.elapsed().as_nanos());
    println!("i32 : {}" , x);

    let start = Instant::now();

    let mut x:i64 = 1;

    let mut i = 1;

    loop {
        x += x;

        i += 1;

        if i > 30 {
            break;
        }
    }

    println!("cost : {:?} ns", start.elapsed().as_nanos());
    println!("i64 : {}" , x);

    println!("Hello, world!");
}
